<template>
	<view>
		<uv-navbar leftText="返回" autoBack="true" title="初次使用说明" @leftClick="leftClick"></uv-navbar>
		<RxLogo></RxLogo>
		<view class="in_shuoming">
			<uv-text :bold="true" size="16" :text="yisheng"></uv-text>
			<uv-text :text="yisheng_content" style="margin-top: 10rpx;"></uv-text>
		</view>
		<view class="in_shuoming1">
			<uv-text :bold="true" size="16" :text="note"></uv-text>
			<uv-text :text="note_content" style="margin-top: 10rpx;"></uv-text>
		</view>
		<view class="in_shuoming2">
			<uv-text :bold="true" size="16" :text="note2"></uv-text>
			<uv-text :text="note_content2" style="margin-top: 10rpx;"></uv-text>
		</view>

		<view v-if="show">
			<view class="shuoming3">
				<uv-text :bold="true" size="16" :text="note3"></uv-text>
				<uv-text :text="note_content3" style="margin-top: 10rpx;"></uv-text>
			</view>
			<view class="shuoming4">
				<uv-text :bold="true" size="16" :text="note4"></uv-text>
				<uv-text :text="note_content4" style="margin-top: 10rpx;"></uv-text>
			</view>
		</view>
		
	</view>
</template>

<script>
	import RxLogo from '@/components/RxLogo/RxLogo.vue'
	export default {
		components: {
			RxLogo
		},
		data() {
			return {
				yisheng: "· 医生初次使用",
				yisheng_content: "【首次创建诊所】根据提示输入诊所名称、诊所地址、医生名称、医生手机号；【医生加入诊所】扫描医生提供的私有码即可加入；",
				note: "· 护士/复诊电手初次使用",
				note_content: "扫描医生提供的[私有码]；",
				note2: "· 患者初次使用",
				note_content2: "扫描医生提供的[公开码]；",
				note3: "· 消费",
				note_content3: "当 '剩余可用积分' 大于1时医生才可开处方，每开一次处方时积分-1；",
				note4: "· 充值",
				note_content4: "充值比例1:1；在绿色卡片右上角的钻石按钮进入充值页面；当前采用人工充值；",
				show: false
			}
		},
		created() {
			try {
				const userinfo = this.$store.state.userinfo
				if (userinfo.userId && userinfo.types === 1) {
					this.show = true
				} else {
					this.show = false
				}
			} catch (err) {  
				this.show = false
		    } 
		},
		methods: {
			leftClick() {
				uni.navigateBack();
			}
		}
	}
</script>

<style lang="scss">
	.in_shuoming {
		width: 85%;
		margin-top: 20%;
		margin-left: 8%;
	}
	.in_shuoming1 {
		width: 85%;
		margin-top: 5%;
		margin-left: 8%;
	}
	.in_shuoming2 {
		width: 85%;
		margin-top: 5%;
		margin-left: 8%;
	}
	
	.shuoming3 {
		width: 85%;
		margin-top: 5%;
		margin-left: 8%;
	}
	
	.shuoming4 {
		width: 85%;
		margin-top: 5%;
		margin-left: 8%;
	}
</style>
